import"./B603vO-13smUKN.js";import{f as e}from"./DcIns0se4bdVKJ.js";import{D as t,E as n,T as r}from"./aWDZHnvL3RQbKF.js";var i,a,o=!0;function s(){return o}function c(){return i??n(r()).decimal}function l(){return a??n(r()).group}function u(e,t,n=c(),r=l()){let[i,a]=Math.abs(e).toFixed(t).split(`.`),o=i.replace(/\B(?=(\d{3})+(?!\d))/g,r),s=e<0?`-`:``;return a!=null&&t>0?`${s}${o}${n}${a}`:`${s}${o}`}function d(e){e||=0;let t=e/100;return o?t.toLocaleString(r(),{style:`percent`,minimumSignificantDigits:1,maximumFractionDigits:3}):`${u(t*100,t%1==0?0:2)} %`}function f(e,t=``){try{try{return new Intl.NumberFormat(r(),{style:`percent`}).format(e)}catch{}return`${(e*100).toFixed(0)} %`}catch{return t}}var p=`USD`;function m(e){return 2}var h={};function g(e,t=p){if(e==null)return``;if(s()){let n=`${r()}-${t}`,i=h[n];return i??(i=new Intl.NumberFormat(r(),{style:`currency`,currency:t}),h[n]=i),i.format(e)}return`${u(e,m(t))} ${t}`}var _={};function v(e,t=p,n){if(e==null)return``;if(s()){let i=`${r()}-${t}-${n}`,a=_[i];if(a==null){let e=n??new Intl.NumberFormat(r(),{style:`currency`,currency:t}).resolvedOptions().maximumFractionDigits;a=new Intl.NumberFormat(r(),{maximumFractionDigits:e,minimumFractionDigits:e}),_[i]=a}return a.format(e)}return u(e,n??m(t))}function y(e,t=p,n){return`${v(e,t,n)} ${t.toUpperCase()}`}function b(e){if(e==null||e===``)return;let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?void 0:t}function x(e,n={dateStyle:`medium`}){let r=b(e);return r?r.toLocaleDateString(t(),n):``}function S(t){return t==null?``:x(e(t),{day:`2-digit`,month:`2-digit`,year:`2-digit`})}function C(t){return t==null?``:x(e(t),{day:`2-digit`,month:`2-digit`,year:`numeric`})}export{y as a,d as c,v as i,C as n,u as o,g as r,f as s,S as t};